Fix 'Add to bookmarks' initial sensitivity
authorMatthias Clasen <mclasen@redhat.com>
Mon, 22 Jun 2009 03:30:27 +0000 (23:30 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 22 Jun 2009 03:30:27 +0000 (23:30 -0400)
Make sure that we always call bookmarks_check_add_sensitivity() at
least once before popping up a newly created menu. Fixes bug 585858.

gtk/gtkfilechooserdefault.c

index 6a1225ad86a071550c1e63fdd64ae637b1f2e0e8..34dc8b3433cb0affa07dde09ec7c8a3413ccc54a 100644 (file)
@@ -4313,7 +4313,6 @@ file_list_build_popup_menu (GtkFileChooserDefault *impl)
   impl->browse_files_popup_menu_add_shortcut_item = item;
   gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item),
                                 gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_MENU));
-  gtk_widget_set_sensitive (item, FALSE);
   g_signal_connect (item, "activate",
                    G_CALLBACK (add_to_shortcuts_cb), impl);
   gtk_widget_show (item);
@@ -4336,6 +4335,8 @@ file_list_build_popup_menu (GtkFileChooserDefault *impl)
                     G_CALLBACK (show_size_column_toggled_cb), impl);
   gtk_widget_show (item);
   gtk_menu_shell_append (GTK_MENU_SHELL (impl->browse_files_popup_menu), item);
+
+  bookmarks_check_add_sensitivity (impl);
 }
 
 /* Updates the popup menu for the file list, creating it if necessary */